package com.ccys.app.controller;

import com.ccys.app.service.SubscriptionActivationCodeScreenService;
import com.ccys.common.vo.ResponseResultApp;
import com.ccys.db.dto.app.subscriptionActivationCodeScreen.ActivateSubscriptionDto;
import com.ccys.db.dto.app.subscriptionActivationCodeScreen.DeleteConsultProfileDto;
import com.ccys.db.dto.app.subscriptionActivationCodeScreen.DeleteDependantSubscriptionDto;
import com.ccys.db.vo.app.subscriptionAddnewScreen.GetConsultProfileTypeMakeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @program: WhiteCoat
 * @description: 激活订阅的接口
 * @author: ZhangJingCan
 * @create: 2024-01-30 16:58
 **/

@RestController
@Api(tags = "激活订阅的接口")
@RequestMapping("subscriptionActivationCodeScreen")
public class SubscriptionActivationCodeScreenController {

    @Autowired
    private SubscriptionActivationCodeScreenService service;

    @ApiOperation("激活订阅")
    @PostMapping(value = "/ActivateSubscription")
    public ResponseResultApp activateSubscription(@RequestBody ActivateSubscriptionDto dto) {
        return service.activateSubscription(dto);
    }

    @ApiOperation("获取咨询配置文件类型")
    @GetMapping(value = "/GetConsultProfileType")
    public ResponseResultApp<List<GetConsultProfileTypeMakeVo>> getConsultProfileType(Integer service_type) {
        return service.getConsultProfileType(service_type);
    }

    @ApiOperation("删除小孩的订阅")
    @PostMapping(value = "/DeleteDependantSubscription")
    public ResponseResultApp deleteDependantSubscription(@RequestBody DeleteDependantSubscriptionDto dto) {
        return service.deleteDependantSubscription(dto);
    }

    @ApiOperation("删除咨询配置")
    @PostMapping(value = "/DeleteConsultProfile")
    public ResponseResultApp deleteConsultProfile(@RequestBody DeleteConsultProfileDto dto) {
        return service.deleteConsultProfile(dto);
    }

}
